<template>
  <div>
    <el-form
      :inline="true"
      :model="formInline"
      class="demo-form-inline"
    >

      <el-form-item label="华南师范大学附属中学">
        <el-date-picker

          type="date"
          placeholder="选择日期"
        >
        </el-date-picker>
      </el-form-item>

    </el-form>
    <span>单科变更详情</span>
    <el-table
      :data="tableData"
      border
      style="width: 100%;margin-top: 30px"
    >
      <el-table-column
        type="index"
        width="50"
      >
      </el-table-column>
      <el-table-column
        prop="district"
        label="科目"
        width="180"
      >
      </el-table-column>

      <el-table-column
        prop="teachercount"
        label="增加人数"
      >
      </el-table-column>
      <el-table-column
        prop="bestsubject"
        label="减少人数"
      >
      </el-table-column>
      <el-table-column
        prop="schoolname"
        label="选后占比"
      >
      </el-table-column>

    </el-table>

    <span style="margin-top: 30px;display: block">组合变更详情</span>
    <el-table
      :data="tableData2"
      border
      style="width: 100%;margin-top: 30px"
    >
      <el-table-column
        type="index"
        width="50"
      >
      </el-table-column>
      <el-table-column
        prop="district"
        label="科目"
        width="180"
      >
      </el-table-column>

      <el-table-column
        prop="teachercount"
        label="增加人数"
      >
      </el-table-column>
      <el-table-column
        prop="bestsubject"
        label="减少人数"
      >
      </el-table-column>
      <el-table-column
        prop="schoolname"
        label="选后占比"
      >
      </el-table-column>

    </el-table>

  </div>
</template>

    <script>
export default {
  data () {
    return {
      formInline: {
        user: '',
        region: ''
      },
      tableData: [{
                    district: '物理',
                    schoolname: '13%',
                    teachercount: '13',
                    bestsubject: '27'
                  }, {
                    district: '化学',
                    schoolname: '14%',
                    teachercount: '31',
                    bestsubject: '11'
                  }, {
                    district: '生物',
                    schoolname: '6%',
                    teachercount: '38',
                    bestsubject: '2'
                  }, {
                    district: '历史',
                    schoolname: '17.1%',
                    teachercount: '27',
                    bestsubject: '13'
                  },
                  {
                    district: '政治',
                    schoolname: '13.4%',
                    teachercount: '5',
                    bestsubject: '42'
                  }, {
                    district: '地理',
                    schoolname: '16.7%',
                    teachercount: '7',
                    bestsubject: '27'
                  }],
      tableData2: [{
                     district: '物理化学生物',
                     schoolname: '27%',
                     teachercount: '1',
                     bestsubject: '2'
                   }, {
                     district: '物理化学政治',
                     schoolname: '6%',
                     teachercount: '3',
                     bestsubject: '0'
                   }, {
                     district: '物理化学地理',
                     schoolname: '8%',
                     teachercount: '2',
                     bestsubject: '0'
                   }, {
                     district: '物理生物政治',
                     schoolname: '4%',
                     teachercount: '3',
                     bestsubject: '3'
                   },
                   {
                     district: '物理生物地理',
                     schoolname: '6%',
                     teachercount: '4',
                     bestsubject: '1'
                   }, {
                     district: '物理政治地理',
                     schoolname: '26%',
                     teachercount: '0',
                     bestsubject: '2'
                   }, {
                     district: '历史政治地理',
                     schoolname: '5%',
                     teachercount: '2',
                     bestsubject: '0'
                   }, {
                     district: '历史政治生物',
                     schoolname: '4%',
                     teachercount: '1',
                     bestsubject: '4'
                   }, {
                     district: '历史政治化学',
                     schoolname: '4%',
                     teachercount: '3',
                     bestsubject: '3'
                   }, {
                     district: '历史地理生物',
                     schoolname: '3%',
                     teachercount: '0',
                     bestsubject: '2'
                   }, {
                     district: '历史地理化学',
                     schoolname: '2%',
                     teachercount: '0',
                     bestsubject: '3'
                   }, {
                     district: '历史化学生物',
                     schoolname: '5%',
                     teachercount: '2',
                     bestsubject: '1'
                   }]
    }
  },
  methods: {
    handle_detail () {
      this.$router.push('/subject_analysis/subject_combine_detail')
    },
    onSubmit () {

    },
    ondatachange () {
      this.tableData = [{
                          district: '华南师范大学附属中学',
                          schoolname: '13',
                          teachercount: '284',
                          bestsubject: '13%'
                        }, {
                          district: '广东实验中学附属天河学校',
                          schoolname: '9',
                          teachercount: '310',
                          bestsubject: '14%'
                        }, {
                          district: '广州市天河外国语学校',
                          schoolname: '15',
                          teachercount: '238',
                          bestsubject: '16%'
                        }, {
                          district: '广州市第47中学',
                          schoolname: '6',
                          teachercount: '173',
                          bestsubject: '13.1%'
                        },
                        {
                          district: '广州市天荣中学',
                          schoolname: '11',
                          teachercount: '186',
                          bestsubject: '13.4%'
                        }, {
                          district: '广州市华美英语实验学校',
                          schoolname: '15',
                          teachercount: '262',
                          bestsubject: '16.7%'
                        }, {
                          district: '广州市天秀中学',
                          schoolname: '16',
                          teachercount: '135',
                          bestsubject: '12.9%'
                        }, {
                          district: '广州市恒福中学高中部',
                          schoolname: '9',
                          teachercount: '157',
                          bestsubject: '15.7%'
                        }, {
                          district: '华南理工大学附属中学',
                          schoolname: '6',
                          teachercount: '121',
                          bestsubject: '14.9%'
                        }]
    }
  }
}

  </script>

  <style
    rel="stylesheet/scss"
    lang="scss"
    scoped
  >
  </style>

